package com.company.service;

import java.util.Set;

/**
 * Created by tu on 2017/7/3.
 */
public interface ICacheService {

  String set(final String key, String value);

  String setex(final String key, final int seconds, final String value);

  String get(String key);

  Long del(final String... keys);

  Long del(String key);

  /**
   * 删除key
   *
   * @param pattern keys
   * @return 数量
   */
  Long delPattern(String pattern);

  Long exists(final String... keys);

  Boolean exists(final String key);

  /**
   * 获取keys
   *
   * @return Multi bulk reply
   */
  Set<String> keys(String pattern);
}
